﻿using Hotel_Project.Bean;
using Hotel_Project.BIZ;
using Hotel_Project.Tools.MySqlData_Helps;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hotel_Project.HotelForm
{
    public partial class ScheduledRegistrationFrom : Form
    {
        public ScheduledRegistrationFrom()
        {
            InitializeComponent();

        }
        static ScheduledRegistrationBIZ srBiz = new ScheduledRegistrationBIZ();
        private void saveButton_Click(object sender, EventArgs e)
        {
            srBiz.Add(identitycardtextBox.Text, int.Parse(phoneNumbertextBox.Text), GuestPhonetextBox.Text, char.Parse(GuestSextextBox.Text), DateTime.Now.ToString("yyyy-MM-dd HH：mm：ss：ffff"), scheduledTimetextBox.Text, FroorcomboBox.Text, int.Parse(roomNumbertextBox.Text));
            ScheduledQuery.DataSource = srBiz.Table2List<ScheduledRegistration>(srBiz.GetDataTable(ScheduledRegistrationBIZ.MYSQL_CONNAND, ScheduledRegistrationBIZ.MYSQL_SELECT_st));
            ScheduledQuery.Refresh();
        }
    }
}
